<?php use_stylesheet('jobs.css') ?>
<?php slot('title', sprintf('Jobs in the %s category',$category->getName())) ?>
<div class="category">
  <div class="feed">
    <a href="">Feed</a>
  </div>
  <h1><?php echo $category ?></h1>
</div>

<?php include_partial('job/list', array('jobs' => $pager->getResults())) ?>
<?php if ($pager->haveToPaginate()): ?>
<div class="pagination">
  <a href="<?php echo url_for('category', $category) ?>?page=1"><img src="http://www.symfony-project.org/images/first.png" alt="First page" /></a>
  <a href="<?php echo url_for('category', $category) ?>?page=<?php echo $pager->getPreviousPage() ?>"><img src="http://www.symfony-project.org/images/previous.png" alt="Previous page" title="Previous page" /></a>
<?php foreach ($pager->getLinks() as $page): ?>
  <?php if ($page == $pager->getPage()): ?>
    <?php echo $page ?>
  <?php else: ?>
    <a href="<?php echo url_for('category', $category) ?>?page=<?php echo $page ?>"><?php echo $page ?></a>
  <?php endif; ?>
<?php endforeach; ?>
<a href="<?php echo url_for('category', $category) ?>?page=<?php echo $pager->getNextPage() ?>"><img src="http://www.symfony-project.org/images/next.png" alt="Nextpage" title="Next page" /></a>
<a href="<?php echo url_for('category', $category) ?>?page=<?php echo $pager->getLastPage() ?>"><img src="http://www.symfony-project.org/images/last.png" alt="Lastpage" title="Last page" /></a>
</div>
<?php endif; ?>
<div class="pagination_desc">
<strong><?php echo $pager->getNbResults() ?></strong> jobs in this category
<?php if ($pager->haveToPaginate()): ?>
- page <strong><?php echo $pager->getPage() ?>/<?php echo $pager->getLastPage() ?></strong>
<?php endif; ?>
</div>